<?php
namespace App\severces;


class GaodeSeverce
{
    public static function getLongGto($address)
    {
        //把地址转化为经纬度
        $geo =sprintf(config('geo.url'),config('geo.key'),$address);

        $encode=file_get_contents($geo);

        $decode=json_decode($encode,true);

        $location = $decode['geocodes'][0]['location'];

        $locationArr = explode(',',$location);

        return $locationArr;
    }
}
